package com.cgly.medical.controller;

import com.cgly.medical.service.CountService;

import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/counts")
@CrossOrigin
public class CountController {

    @Resource
    private CountService countService;

    //查询某一天的药品订单量
    @GetMapping("countDrugOrder/{day}")
    public Integer countDrugOrder(String day) {
        Integer count =countService.countDrugOrder(day);
        return count;
    }
}
